import { View, Text, Image } from '@tarojs/components'
import Taro, { useDidShow, useLoad } from '@tarojs/taro'
import './index.scss'

export default function Index() {

  useLoad(() => {
    console.log('Page loaded.')
  })

  useDidShow(() => {
    setTimeout(() => {
      Taro.switchTab({
        url: '/pages/Home/index' // 替换为你的目标页面路径
      });
    }, 1000);
  })

  return (
    <View className='flex flex-col items-center justify-center h-screen bg-[#E5E5E5]'>
      <View className='mb-10'>
        <Image src={require('./images/LOGO@2x.png')} className='w-[144px] h-[144px]' />
        <View className='text-[#A6A6A6] text-[30px] mt-1 text-center'>加载中...</View>
      </View>
      <View className='mt-3'>
        <Text className='text-[32px] text-[#333]'> 欢迎您来到 </Text>
      </View>
      <View className='mt-2'>
        <Text className='text-[32px] text-[#333]'> 疫苗先知的世界 </Text>
      </View>
    </View>
  )
}
